import { request } from '@/utils';

export function captchaVerify(data: { behavior: any[] }) {
  return request({
    url: '/sys/captcha',
    method: 'post',
    data
  });
}

export function loginUser<T>(data: {
  username: string;
  password: string;
  loginType: 'username' | 'QQ' | 'WX';
}) {
  return request<T>({
    url: '/sys/login',
    method: 'post',
    data
  });
}

export function registerUser<T = any>(data: {
  username: string;
  password: string;
}) {
  return request<T>({
    url: '/sys/register',
    method: 'post',
    data
  });
}
